/* 支付宝蓝配色的统一样式表 */

/* 颜色变量定义 */
:root {
    --primary-blue: #1677FF;      /* 支付宝蓝主色 */
    --light-blue: #E6F7FF;        /* 浅蓝色背景 */
    --medium-blue: #BAE7FF;       /* 中等蓝色 */
    --dark-blue: #0958D9;         /* 深蓝色 */
    --success-green: #52C41A;     /* 成功绿色 */
    --warning-orange: #FA8C16;    /* 警告橙色 */
    --error-red: #FF4D4F;         /* 错误红色 */
    --text-primary: #262626;      /* 主要文字颜色 */
    --text-secondary: #595959;    /* 次要文字颜色 */
    --text-disabled: #BFBFBF;     /* 禁用文字颜色 */
    --border-color: #D9D9D9;      /* 边框颜色 */
    --background-color: #F5F5F5;  /* 页面背景色 */
    --white: #FFFFFF;             /* 白色 */
}

/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5715;
    color: var(--text-primary);
    background-color: var(--background-color);
    min-height: 100vh;
}

/* 容器布局 */
.layout-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部样式 */
.header {
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.logo {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-blue);
    text-decoration: none;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-name {
    color: var(--text-primary);
    font-weight: 500;
}

.logout-btn {
    background-color: var(--primary-blue);
    color: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.logout-btn:hover {
    background-color: var(--dark-blue);
    color: var(--white);
    text-decoration: none;
}

/* 导航栏样式 */
.navigation {
    background-color: var(--light-blue);
    border-bottom: 1px solid var(--border-color);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: block;
    padding: 16px 24px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue);
    background-color: var(--white);
    border-bottom-color: var(--primary-blue);
    text-decoration: none;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    width: 100%;
}

.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.page-description {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 卡片样式 */
.card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.card-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.card-content {
    padding: 24px;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin: -24px;
    padding: 24px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table th {
    background-color: #FAFAFA;
    color: var(--text-primary);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table tr:hover {
    background-color: #F5F5F5;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    background-color: var(--white);
    color: var(--text-primary);
}

.btn:hover {
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--dark-blue);
    border-color: var(--dark-blue);
    color: var(--white);
}

.btn-success {
    background-color: var(--success-green);
    border-color: var(--success-green);
    color: var(--white);
}

.btn-success:hover {
    background-color: #389E0D;
    border-color: #389E0D;
    color: var(--white);
}

.btn-danger {
    background-color: var(--error-red);
    border-color: var(--error-red);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #D4380D;
    border-color: #D4380D;
    color: var(--white);
}

.btn-warning {
    background-color: var(--warning-orange);
    border-color: var(--warning-orange);
    color: var(--white);
}

.btn-warning:hover {
    background-color: #D46B08;
    border-color: #D46B08;
    color: var(--white);
}

/* 表单样式 */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.2);
}

/* 消息提示样式 */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    border: 1px solid;
}

.alert-success {
    background-color: #F6FFED;
    border-color: #B7EB8F;
    color: #389E0D;
}

.alert-error {
    background-color: #FFF2F0;
    border-color: #FFCCC7;
    color: #CF1322;
}

.alert-warning {
    background-color: #FFFBE6;
    border-color: #FFE58F;
    color: #D48806;
}

.alert-info {
    background-color: var(--light-blue);
    border-color: var(--medium-blue);
    color: var(--dark-blue);
}

/* 状态指示器 */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-online .status-dot {
    background-color: var(--success-green);
}

.status-offline .status-dot {
    background-color: var(--error-red);
}

.status-warning .status-dot {
    background-color: var(--warning-orange);
}

/* 操作栏样式 */
.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination .btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 登录页面样式 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--medium-blue) 100%);
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 40px;
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        padding: 0 16px;
        height: 56px;
    }

    .nav-content {
        padding: 0 16px;
    }

    .nav-menu {
        flex-wrap: wrap;
    }

    .nav-link {
        padding: 12px 16px;
    }

    .main-content {
        padding: 16px;
    }

    .card-content {
        padding: 16px;
    }

    .action-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .action-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .user-info {
        gap: 8px;
    }

    .user-name {
        display: none;
    }

    .nav-menu {
        flex-direction: column;
    }

    .nav-link {
        border-bottom: none;
        border-left: 3px solid transparent;
    }

    .nav-link:hover,
    .nav-link.active {
        border-left-color: var(--primary-blue);
        border-bottom-color: transparent;
    }
}

/* 工具类 */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }